//****************************************************************
//      Car.java            Author:GK
//
//      创建一个Car类。
//****************************************************************

public class Car {
    private String name;
    private String num;
    private int year;
    private boolean TF;

    public Car(String a, String b, int c)//构造
    {
        name = a;
        num = b;
        year = c;
    }
    public String getname()
    {
    	return name;
	}
    public String getnum()
    {
    	return num;
	}
    public int getyear()
    {
    	return year;
	}
    public boolean isAntique()//表示这辆车是古董车的布尔值
    {
        TF=2018 - year > 45;//45年以上为古董车
	return TF;
    }
    public String toString()
    {
        return name + "\t" + num + "\t" + year;
    }
    public Boolean toBoolean()
    {
    	return TF;
    }

}
